package com.qf.controller;

import com.qf.pojo.req.ReqSeckillDrug;
import com.qf.pojo.resp.Resultmsg;
import com.qf.service.SeckillDrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName SeckillDrug
 * @Description
 * @Author lanzhike
 * @Date 2023/8/16/0016 下午 07:18
 * @Version 1.0
 */
@RestController
@RequestMapping("/seckillDrug")
public class SeckillDrugController {

    @Autowired
    SeckillDrugService seckillDrugService;

    @RequestMapping("/findData")
    public Resultmsg findData(){
        return seckillDrugService.findData();
    }

    @RequestMapping("/findSeckillDrug")
    public Resultmsg findSeckillDrug(@RequestBody ReqSeckillDrug seckillDrug){
        return seckillDrugService.findSeckillDrug(seckillDrug);
    }

    @RequestMapping("/seckill")
    public Resultmsg seckill(@RequestBody ReqSeckillDrug seckillDrug, HttpServletRequest request){
        return seckillDrugService.seckill(seckillDrug,request);
    }
}
